package cn.com.bluemoon.daps.system.entity;


import cn.com.bluemoon.daps.common.domain.BaseModel;
import cn.com.bluemoon.daps.common.enums.DatabaseType;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * <p>
 * 系统数据源表
 * </p>
 *
 * @author admin
 * @since 2020-08-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors
@ApiModel(value = "DapSystemDatasource", description = "系统数据源表")
public class DapSystemDatasource extends BaseModel<DapSystemDatasource> {

    private static final long serialVersionUID = 1L;

    /**
     * 非必填，存在文件系统的数据类型为空
     */
    @ApiModelProperty(value = "数据库类型, 1:mysql 2:pgsql 3:hive ...")
    @EnumValue
    private DatabaseType databaseType;

    @ApiModelProperty(value = "备注")
    @Size(max = 200, message = "数据源描述不能超过{max}")
    private String description;

    @ApiModelProperty(value = "数据源名称")
    @NotNull(message = "数据源名称不允许为空")
    @Size(max = 32, message = "数据源名称不能超过{max}")
    private String name;

    @ApiModelProperty(value = "系统信息id")
    private String systemInfoId;

    @ApiModelProperty(value = "源类型,0 数据库 1 文件系统")
    private Integer type;

    @ApiModelProperty(value = "数据源用途,0:存储业务数据、1:采集元数据")
    private Integer usable;

    @ApiModelProperty(value = "是否自动审核，false表示否，true表示是")
    private Boolean autoCheck;

    @ApiModelProperty("是否开启ptosc，false表示否，true表示是")
    private Boolean isPtosc;

    @ApiModelProperty("是否开启同步，false表示否，true表示是")
    private Boolean isSync;

}
